#!/bin/bash

# 查找进程id
pid=$(ps -ef | grep bot-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{print $2}')

# 检查进程是否存在
if [[ -n "$pid" ]]; then
  # 结束进程
  kill -9 ${pid}
  echo "已结束进程：" ${pid}
else
  echo "未找到对应进程"
fi
